Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

insert prompt into copilot panel from landing, open panel on entry

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim Canceled Canceled Sep 17, 2025 7:24pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Sep 17, 2025 7:24pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR implements a seamless user onboarding flow that allows users to enter prompts on the landing page and have them automatically transferred to the copilot panel when they navigate to a workspace. The feature involves several coordinated changes across the application:

Core Implementation:

  • A new LandingPromptStorage utility class in browser-storage.ts handles cross-page data transfer using localStorage with SSR safety, automatic expiration (24 hours), and proper error handling
  • The landing page hero component now stores user prompts in localStorage before redirecting to signup
  • The workspace panel system consumes stored prompts and automatically opens the copilot panel with the prompt pre-filled

Panel System Enhancements:

  • Added openCopilotPanel() method to the panel store for atomic operations that both open the panel and set the active tab to 'copilot'
  • Reordered panel tabs to prioritize copilot as the first tab, making it the primary interface
  • Implemented a useEffect hook in panel.tsx that checks for stored prompts on component mount and automatically triggers the copilot panel opening

Copilot Component Updates:

  • Added setInputValueAndFocus() method to the copilot component's ref interface, allowing external components to programmatically populate the input field
  • Used useCallback and setTimeout to ensure proper DOM updates and focus behavior when setting input values
  • Removed the Bot icon from the copilot welcome interface as part of design simplification

Integration Flow:
The feature creates a complete user journey: landing page prompt → localStorage storage → workspace navigation → automatic copilot panel opening → prompt population and input focus. This reduces friction in the user onboarding process by preserving context across page transitions and eliminating the need for users to re-enter their initial prompts.

Confidence score: 4/5

  • This PR implements a well-thought-out user experience improvement with proper error handling and edge case management
  • Score reflects solid implementation with good separation of concerns, though some complexity in timing-dependent operations and potential storage utility duplication
  • Pay close attention to the browser storage utility and timing-dependent useEffect in panel.tsx

7 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 325a666 into staging Sep 17, 2025
6 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/landing branch September 17, 2025 19:28
Acumen-Desktop pushed a commit to Acumen-Desktop/sim that referenced this pull request Sep 20, 2025
…open panel on entry (simstudioai#1363)

* update infra and remove railway

* improvement(landing): insert prompt into copilot panel from landing, open panel on entry

* Revert "update infra and remove railway"

This reverts commit abfa2f8.

* fixes

* remove debug logs

* go back to old env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants